<template>
  <div>
    组件b
    {{msg}}
    <button @click="keepclick">点击b然后因为keep-alive缓存</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      msg: "sda"
    };
  },
  methods:{
      keepclick(){
          this.msg="fsfdg"
      }
  }
};
</script>

<style>
</style>